package edu.asu.sapa.ground.update;

import edu.asu.sapa.Planner;
import edu.asu.sapa.ground.State;

public class EndPointLoader extends Load {

	public EndPointLoader(Update[] array) {
		super(array);
	}

	@Override
	public final boolean load(State s, Context c) {
		float t = c.finish;
//		for (Update u : contents) {
//			s.events.add(c,u,UpdateWrapper.UpdateBefore,t);
//		}
		s.events.add(c,this,UpdateWrapper.UpdateBefore,t);
		return true;
	}
	
	@Override
	public final boolean applicableBefore(State s, Context c) {
		return true;
	}
	@Override
	public final boolean applicableAfter(State s, Context c) {
		return true;
	}
	
	public String toString() {
		return "\t(at end " + super.toString();
	}

}
